home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 July: Mac OS SDK / Dev.CD Jul 00 SDK2.toast / Development Kits / Cross Platform / QuickTime 4.1.2 Windows SDK / CIncludes / DriverServices.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-04-12  |  16.8 KB  |  660 lines  |  [TEXT/R*ch]

  1. /*
  2.      File:        DriverServices.h
  3.  
  4.      Contains:    Driver Services Interfaces.
  5.  
  6.      Version:    Technology:    PowerSurge 1.0.2
  7.                  Release:    QuickTime 4.1
  8.  
  9.      Copyright:    (c) 1985-1999 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __DRIVERSERVICES__
  18. #define __DRIVERSERVICES__
  19.  
  20. #ifndef __CONDITIONALMACROS__
  21.     #include <ConditionalMacros.h>
  22. #endif
  23.  
  24. #ifndef __MACTYPES__
  25.     #include <MacTypes.h>
  26. #endif
  27.  
  28. #ifndef __MACERRORS__
  29.     #include <MacErrors.h>
  30. #endif
  31.  
  32. #ifndef __MACHINEEXCEPTIONS__
  33.     #include <MachineExceptions.h>
  34. #endif
  35.  
  36. #ifndef __DEVICES__
  37.     #include <Devices.h>
  38. #endif
  39.  
  40. #ifndef __DRIVERSYNCHRONIZATION__
  41.     #include <DriverSynchronization.h>
  42. #endif
  43.  
  44. #ifndef __NAMEREGISTRY__
  45.     #include <NameRegistry.h>
  46. #endif
  47.  
  48.  
  49.  
  50.  
  51. #if PRAGMA_ONCE
  52. #pragma once
  53. #endif
  54.  
  55. #ifdef __cplusplus
  56. extern "C" {
  57. #endif
  58.  
  59. #if PRAGMA_IMPORT
  60. #pragma import on
  61. #endif
  62.  
  63. #if PRAGMA_STRUCT_ALIGN
  64.     #pragma options align=power
  65. #elif PRAGMA_STRUCT_PACKPUSH
  66.     #pragma pack(push, 2)
  67. #elif PRAGMA_STRUCT_PACK
  68.     #pragma pack(2)
  69. #endif
  70.  
  71. /******************************************************************
  72.  *
  73.  *         Previously in Kernel.h
  74.  *
  75.  ******************************************************************/
  76. /* Kernel basics*/
  77. typedef struct OpaqueIOPreparationID*     IOPreparationID;
  78. typedef struct OpaqueSoftwareInterruptID*  SoftwareInterruptID;
  79. typedef struct OpaqueTaskID*             TaskID;
  80. typedef struct OpaqueTimerID*             TimerID;
  81. /* Tasking*/
  82. typedef UInt32                             ExecutionLevel;
  83. enum {
  84.     kTaskLevel                    = 0,
  85.     kSoftwareInterruptLevel        = 1,
  86.     kAcceptFunctionLevel        = 2,
  87.     kKernelLevel                = 3,
  88.     kSIHAcceptFunctionLevel        = 4,
  89.     kSecondaryInterruptLevel    = 5,
  90.     kHardwareInterruptLevel        = 6
  91. };
  92.  
  93. typedef CALLBACK_API_C( void , SoftwareInterruptHandler )(void *p1, void *p2);
  94. typedef CALLBACK_API_C( OSStatus , SecondaryInterruptHandler2 )(void *p1, void *p2);
  95. #define kCurrentAddressSpaceID ((AddressSpaceID) -1)
  96. /* Memory System basics*/
  97.  
  98. struct LogicalAddressRange {
  99.     LogicalAddress                     address;
  100.     ByteCount                         count;
  101. };
  102. typedef struct LogicalAddressRange        LogicalAddressRange;
  103. typedef LogicalAddressRange *            LogicalAddressRangePtr;
  104.  
  105. struct PhysicalAddressRange {
  106.     PhysicalAddress                 address;
  107.     ByteCount                         count;
  108. };
  109. typedef struct PhysicalAddressRange        PhysicalAddressRange;
  110. typedef PhysicalAddressRange *            PhysicalAddressRangePtr;
  111. /* For PrepareMemoryForIO and CheckpointIO*/
  112.  
  113. typedef OptionBits                         IOPreparationOptions;
  114. enum {
  115.     kIOMultipleRanges            = 0x00000001,
  116.     kIOLogicalRanges            = 0x00000002,
  117.     kIOMinimalLogicalMapping    = 0x00000004,
  118.     kIOShareMappingTables        = 0x00000008,
  119.     kIOIsInput                    = 0x00000010,
  120.     kIOIsOutput                    = 0x00000020,
  121.     kIOCoherentDataPath            = 0x00000040,
  122.     kIOTransferIsLogical        = 0x00000080,
  123.     kIOClientIsUserMode            = 0x00000080
  124. };
  125.  
  126. typedef OptionBits                         IOPreparationState;
  127. enum {
  128.     kIOStateDone                = 0x00000001
  129. };
  130.  
  131. enum {
  132.     kInvalidPageAddress            = (-1)
  133. };
  134.  
  135.  
  136. struct AddressRange {
  137.     void *                            base;
  138.     ByteCount                         length;
  139. };
  140. typedef struct AddressRange                AddressRange;
  141. /* C's treatment of arrays and array pointers is atypical*/
  142.  
  143. typedef LogicalAddress *                LogicalMappingTablePtr;
  144. typedef PhysicalAddress *                PhysicalMappingTablePtr;
  145. typedef AddressRange *                    AddressRangeTablePtr;
  146.  
  147. struct MultipleAddressRange {
  148.     ItemCount                         entryCount;
  149.     AddressRangeTablePtr             rangeTable;
  150. };
  151. typedef struct MultipleAddressRange        MultipleAddressRange;
  152. /*
  153.    Separate C definition so that union has a name.  A future version of the interfacer
  154.    tool will allow a name (that gets thrown out in Pascal and Asm).
  155. */
  156.  
  157. struct IOPreparationTable {
  158.     IOPreparationOptions             options;
  159.     IOPreparationState                 state;
  160.     IOPreparationID                 preparationID;
  161.     AddressSpaceID                     addressSpace;
  162.     ByteCount                         granularity;
  163.     ByteCount                         firstPrepared;
  164.     ByteCount                         lengthPrepared;
  165.     ItemCount                         mappingEntryCount;
  166.     LogicalMappingTablePtr             logicalMapping;
  167.     PhysicalMappingTablePtr         physicalMapping;
  168.     union {
  169.         AddressRange                     range;
  170.         MultipleAddressRange             multipleRanges;
  171.     }                                 rangeInfo;
  172. };
  173. typedef struct IOPreparationTable        IOPreparationTable;
  174.  
  175. typedef OptionBits                         IOCheckpointOptions;
  176. enum {
  177.     kNextIOIsInput                = 0x00000001,
  178.     kNextIOIsOutput                = 0x00000002,
  179.     kMoreIOTransfers            = 0x00000004
  180. };
  181.  
  182. /* For SetProcessorCacheMode*/
  183.  
  184. typedef UInt32                             ProcessorCacheMode;
  185. enum {
  186.     kProcessorCacheModeDefault    = 0,
  187.     kProcessorCacheModeInhibited = 1,
  188.     kProcessorCacheModeWriteThrough = 2,
  189.     kProcessorCacheModeCopyBack    = 3
  190. };
  191.  
  192. /*
  193.    For GetPageInformation
  194.    (Note: if kPageInformationVersion fails, try 0 -- old versions of DSL defined  kPageInformationVersion as 0)
  195. */
  196.  
  197. enum {
  198.     kPageInformationVersion        = 1
  199. };
  200.  
  201. typedef UInt32                             PageStateInformation;
  202. enum {
  203.     kPageIsProtected            = 0x00000001,
  204.     kPageIsProtectedPrivileged    = 0x00000002,
  205.     kPageIsModified                = 0x00000004,
  206.     kPageIsReferenced            = 0x00000008,
  207.     kPageIsLockedResident        = 0x00000010,                    /* held and locked resident*/
  208.     kPageIsInMemory                = 0x00000020,
  209.     kPageIsShared                = 0x00000040,
  210.     kPageIsWriteThroughCached    = 0x00000080,
  211.     kPageIsCopyBackCached        = 0x00000100,
  212.     kPageIsHeldResident            = 0x00000200,                    /* held resident - use kPageIsLockedResident to check for locked state*/
  213.     kPageIsLocked                = kPageIsLockedResident,        /* Deprecated*/
  214.     kPageIsResident                = kPageIsInMemory                /* Deprecated*/
  215. };
  216.  
  217.  
  218. struct PageInformation {
  219.     AreaID                             area;
  220.     ItemCount                         count;
  221.     PageStateInformation             information[1];
  222. };
  223. typedef struct PageInformation            PageInformation;
  224. typedef PageInformation *                PageInformationPtr;
  225.  
  226. /*  Tasks  */
  227. EXTERN_API_C( ExecutionLevel )
  228. CurrentExecutionLevel            (void);
  229.  
  230. EXTERN_API_C( TaskID )
  231. CurrentTaskID                    (void);
  232.  
  233. EXTERN_API_C( OSStatus )
  234. DelayFor                        (Duration                 delayDuration);
  235.  
  236. EXTERN_API_C( Boolean )
  237. InPrivilegedMode                (void);
  238.  
  239.  
  240. /*  Software Interrupts  */
  241. EXTERN_API_C( OSStatus )
  242. CreateSoftwareInterrupt            (SoftwareInterruptHandler  handler,
  243.                                  TaskID                 task,
  244.                                  void *                    p1,
  245.                                  Boolean                 persistent,
  246.                                  SoftwareInterruptID *    theSoftwareInterrupt);
  247.  
  248.  
  249. EXTERN_API_C( OSStatus )
  250. SendSoftwareInterrupt            (SoftwareInterruptID     theSoftwareInterrupt,
  251.                                  void *                    p2);
  252.  
  253. EXTERN_API_C( OSStatus )
  254. DeleteSoftwareInterrupt            (SoftwareInterruptID     theSoftwareInterrupt);
  255.  
  256. #if TARGET_OS_MAC
  257. /*  Secondary Interrupts  */
  258. EXTERN_API_C( OSStatus )
  259. CallSecondaryInterruptHandler2    (SecondaryInterruptHandler2  theHandler,
  260.                                  ExceptionHandler         exceptionHandler,
  261.                                  void *                    p1,
  262.                                  void *                    p2);
  263.  
  264. EXTERN_API_C( OSStatus )
  265. QueueSecondaryInterruptHandler    (SecondaryInterruptHandler2  theHandler,
  266.                                  ExceptionHandler         exceptionHandler,
  267.                                  void *                    p1,
  268.                                  void *                    p2);
  269.  
  270. #endif  /* TARGET_OS_MAC */
  271.  
  272. /*  Timers  */
  273. EXTERN_API_C( OSStatus )
  274. SetInterruptTimer                (const AbsoluteTime *    expirationTime,
  275.                                  SecondaryInterruptHandler2  handler,
  276.                                  void *                    p1,
  277.                                  TimerID *                theTimer);
  278.  
  279. EXTERN_API_C( OSStatus )
  280. SetPersistentTimer                (Duration                 frequency,
  281.                                  SecondaryInterruptHandler2  theHandler,
  282.                                  void *                    p1,
  283.                                  TimerID *                theTimer);
  284.  
  285. EXTERN_API_C( OSStatus )
  286. CancelTimer                        (TimerID                 theTimer,
  287.                                  AbsoluteTime *            timeRemaining);
  288.  
  289.  
  290. /*  I/O related Operations  */
  291. EXTERN_API_C( OSStatus )
  292. PrepareMemoryForIO                (IOPreparationTable *    theIOPreparationTable);
  293.  
  294. EXTERN_API_C( OSStatus )
  295. CheckpointIO                    (IOPreparationID         theIOPreparation,
  296.                                  IOCheckpointOptions     options);
  297.  
  298.  
  299. /*  Memory Operations  */
  300. EXTERN_API_C( OSStatus )
  301. GetPageInformation                (AddressSpaceID         addressSpace,
  302.                                  ConstLogicalAddress     base,
  303.                                  ByteCount                 length,
  304.                                  PBVersion                 version,
  305.                                  PageInformation *        thePageInfo);
  306.  
  307. /*  Processor Cache Related  */
  308. EXTERN_API_C( OSStatus )
  309. SetProcessorCacheMode            (AddressSpaceID         addressSpace,
  310.                                  ConstLogicalAddress     base,
  311.                                  ByteCount                 length,
  312.                                  ProcessorCacheMode     cacheMode);
  313.  
  314. /******************************************************************
  315.  *
  316.  *         Was in DriverSupport.h or DriverServices.h
  317.  *
  318.  ******************************************************************/
  319. #define    kAAPLDeviceLogicalAddress "AAPL,address"
  320.  
  321. typedef LogicalAddress *                DeviceLogicalAddressPtr;
  322. enum {
  323.     durationMicrosecond            = -1L,                            /* Microseconds are negative*/
  324.     durationMillisecond            = 1L,                            /* Milliseconds are positive*/
  325.     durationSecond                = 1000L,                        /* 1000 * durationMillisecond*/
  326.     durationMinute                = 60000L,                        /* 60 * durationSecond,*/
  327.     durationHour                = 3600000L,                        /* 60 * durationMinute,*/
  328.     durationDay                    = 86400000L,                    /* 24 * durationHour,*/
  329.     durationNoWait                = 0L,                            /* don't block*/
  330.     durationForever                = 0x7FFFFFFF                    /* no time limit*/
  331. };
  332.  
  333. enum {
  334.     k8BitAccess                    = 0,                            /* access as 8 bit*/
  335.     k16BitAccess                = 1,                            /* access as 16 bit*/
  336.     k32BitAccess                = 2                                /* access as 32 bit*/
  337. };
  338.  
  339. typedef UnsignedWide                     Nanoseconds;
  340.  
  341. EXTERN_API_C( OSErr )
  342. IOCommandIsComplete                (IOCommandID             theID,
  343.                                  OSErr                     theResult);
  344.  
  345. EXTERN_API_C( OSErr )
  346. GetIOCommandInfo                (IOCommandID             theID,
  347.                                  IOCommandContents *    theContents,
  348.                                  IOCommandCode *        theCommand,
  349.                                  IOCommandKind *        theKind);
  350.  
  351. EXTERN_API_C( void )
  352. UpdateDeviceActivity            (RegEntryID *            deviceEntry);
  353.  
  354. EXTERN_API_C( void )
  355. BlockCopy                        (const void *            srcPtr,
  356.                                  void *                    destPtr,
  357.                                  Size                     byteCount);
  358.  
  359. EXTERN_API_C( LogicalAddress )
  360. PoolAllocateResident            (ByteCount                 byteSize,
  361.                                  Boolean                 clear);
  362.  
  363. EXTERN_API_C( OSStatus )
  364. PoolDeallocate                    (LogicalAddress         address);
  365.  
  366. EXTERN_API_C( ByteCount )
  367. GetLogicalPageSize                (void);
  368.  
  369. EXTERN_API_C( ByteCount )
  370. GetDataCacheLineSize            (void);
  371.  
  372. EXTERN_API_C( OSStatus )
  373. FlushProcessorCache                (AddressSpaceID         spaceID,
  374.                                  LogicalAddress         base,
  375.                                  ByteCount                 length);
  376.  
  377. EXTERN_API_C( LogicalAddress )
  378. MemAllocatePhysicallyContiguous    (ByteCount                 byteSize,
  379.                                  Boolean                 clear);
  380.  
  381. EXTERN_API_C( OSStatus )
  382. MemDeallocatePhysicallyContiguous (LogicalAddress         address);
  383.  
  384.  
  385. EXTERN_API_C( AbsoluteTime )
  386. UpTime                            (void);
  387.  
  388. EXTERN_API_C( void )
  389. GetTimeBaseInfo                    (UInt32 *                minAbsoluteTimeDelta,
  390.                                  UInt32 *                theAbsoluteTimeToNanosecondNumerator,
  391.                                  UInt32 *                theAbsoluteTimeToNanosecondDenominator,
  392.                                  UInt32 *                theProcessorToAbsoluteTimeNumerator,
  393.                                  UInt32 *                theProcessorToAbsoluteTimeDenominator);
  394.  
  395.  
  396. EXTERN_API_C( Nanoseconds )
  397. AbsoluteToNanoseconds            (AbsoluteTime             absoluteTime);
  398.  
  399. EXTERN_API_C( Duration )
  400. AbsoluteToDuration                (AbsoluteTime             absoluteTime);
  401.  
  402. EXTERN_API_C( AbsoluteTime )
  403. NanosecondsToAbsolute            (Nanoseconds             nanoseconds);
  404.  
  405. EXTERN_API_C( AbsoluteTime )
  406. DurationToAbsolute                (Duration                 duration);
  407.  
  408. EXTERN_API_C( AbsoluteTime )
  409. AddAbsoluteToAbsolute            (AbsoluteTime             absoluteTime1,
  410.                                  AbsoluteTime             absoluteTime2);
  411.  
  412. EXTERN_API_C( AbsoluteTime )
  413. SubAbsoluteFromAbsolute            (AbsoluteTime             leftAbsoluteTime,
  414.                                  AbsoluteTime             rightAbsoluteTime);
  415.  
  416. EXTERN_API_C( AbsoluteTime )
  417. AddNanosecondsToAbsolute        (Nanoseconds             nanoseconds,
  418.                                  AbsoluteTime             absoluteTime);
  419.  
  420. EXTERN_API_C( AbsoluteTime )
  421. AddDurationToAbsolute            (Duration                 duration,
  422.                                  AbsoluteTime             absoluteTime);
  423.  
  424. EXTERN_API_C( AbsoluteTime )
  425. SubNanosecondsFromAbsolute        (Nanoseconds             nanoseconds,
  426.                                  AbsoluteTime             absoluteTime);
  427.  
  428. EXTERN_API_C( AbsoluteTime )
  429. SubDurationFromAbsolute            (Duration                 duration,
  430.                                  AbsoluteTime             absoluteTime);
  431.  
  432. EXTERN_API_C( Nanoseconds )
  433. AbsoluteDeltaToNanoseconds        (AbsoluteTime             leftAbsoluteTime,
  434.                                  AbsoluteTime             rightAbsoluteTime);
  435.  
  436. EXTERN_API_C( Duration )
  437. AbsoluteDeltaToDuration            (AbsoluteTime             leftAbsoluteTime,
  438.                                  AbsoluteTime             rightAbsoluteTime);
  439.  
  440. EXTERN_API_C( Nanoseconds )
  441. DurationToNanoseconds            (Duration                 theDuration);
  442.  
  443. EXTERN_API_C( Duration )
  444. NanosecondsToDuration            (Nanoseconds             theNanoseconds);
  445.  
  446.  
  447. EXTERN_API_C( OSErr )
  448. PBQueueInit                        (QHdrPtr                 qHeader);
  449.  
  450. EXTERN_API_C( OSErr )
  451. PBQueueCreate                    (QHdrPtr *                qHeader);
  452.  
  453. EXTERN_API_C( OSErr )
  454. PBQueueDelete                    (QHdrPtr                 qHeader);
  455.  
  456. EXTERN_API_C( void )
  457. PBEnqueue                        (QElemPtr                 qElement,
  458.                                  QHdrPtr                 qHeader);
  459.  
  460. EXTERN_API_C( OSErr )
  461. PBEnqueueLast                    (QElemPtr                 qElement,
  462.                                  QHdrPtr                 qHeader);
  463.  
  464. EXTERN_API_C( OSErr )
  465. PBDequeue                        (QElemPtr                 qElement,
  466.                                  QHdrPtr                 qHeader);
  467.  
  468. EXTERN_API_C( OSErr )
  469. PBDequeueFirst                    (QHdrPtr                 qHeader,
  470.                                  QElemPtr *                theFirstqElem);
  471.  
  472. EXTERN_API_C( OSErr )
  473. PBDequeueLast                    (QHdrPtr                 qHeader,
  474.                                  QElemPtr *                theLastqElem);
  475.  
  476. EXTERN_API_C( char *)
  477. CStrCopy                        (char *                    dst,
  478.                                  const char *            src);
  479.  
  480. EXTERN_API_C( StringPtr )
  481. PStrCopy                        (StringPtr                 dst,
  482.                                  ConstStr255Param         src);
  483.  
  484. EXTERN_API_C( char *)
  485. CStrNCopy                        (char *                    dst,
  486.                                  const char *            src,
  487.                                  UInt32                 max);
  488.  
  489. EXTERN_API_C( StringPtr )
  490. PStrNCopy                        (StringPtr                 dst,
  491.                                  ConstStr255Param         src,
  492.                                  UInt32                 max);
  493.  
  494. EXTERN_API_C( char *)
  495. CStrCat                            (char *                    dst,
  496.                                  const char *            src);
  497.  
  498. EXTERN_API_C( StringPtr )
  499. PStrCat                            (StringPtr                 dst,
  500.                                  ConstStr255Param         src);
  501.  
  502. EXTERN_API_C( char *)
  503. CStrNCat                        (char *                    dst,
  504.                                  const char *            src,
  505.                                  UInt32                 max);
  506.  
  507. EXTERN_API_C( StringPtr )
  508. PStrNCat                        (StringPtr                 dst,
  509.                                  ConstStr255Param         src,
  510.                                  UInt32                 max);
  511.  
  512. EXTERN_API_C( void )
  513. PStrToCStr                        (char *                    dst,
  514.                                  ConstStr255Param         src);
  515.  
  516. EXTERN_API_C( void )
  517. CStrToPStr                        (Str255                 dst,
  518.                                  const char *            src);
  519.  
  520. EXTERN_API_C( SInt16 )
  521. CStrCmp                            (const char *            s1,
  522.                                  const char *            s2);
  523.  
  524. EXTERN_API_C( SInt16 )
  525. PStrCmp                            (ConstStr255Param         str1,
  526.                                  ConstStr255Param         str2);
  527.  
  528. EXTERN_API_C( SInt16 )
  529. CStrNCmp                        (const char *            s1,
  530.                                  const char *            s2,
  531.                                  UInt32                 max);
  532.  
  533. EXTERN_API_C( SInt16 )
  534. PStrNCmp                        (ConstStr255Param         str1,
  535.                                  ConstStr255Param         str2,
  536.                                  UInt32                 max);
  537.  
  538. EXTERN_API_C( UInt32 )
  539. CStrLen                            (const char *            src);
  540.  
  541. EXTERN_API_C( UInt32 )
  542. PStrLen                            (ConstStr255Param         src);
  543.  
  544. EXTERN_API_C( OSStatus )
  545. DeviceProbe                        (void *                    theSrc,
  546.                                  void *                    theDest,
  547.                                  UInt32                 AccessType);
  548.  
  549. EXTERN_API_C( OSStatus )
  550. DelayForHardware                (AbsoluteTime             absoluteTime);
  551.  
  552.  
  553.  
  554. /******************************************************************
  555.  *
  556.  *         Was in Interrupts.h 
  557.  *
  558.  ******************************************************************/
  559. /*  Interrupt types  */
  560. typedef struct OpaqueInterruptSetID*     InterruptSetID;
  561. typedef long                             InterruptMemberNumber;
  562.  
  563. struct InterruptSetMember {
  564.     InterruptSetID                     setID;
  565.     InterruptMemberNumber             member;
  566. };
  567. typedef struct InterruptSetMember        InterruptSetMember;
  568. enum {
  569.     kISTChipInterruptSource        = 0,
  570.     kISTOutputDMAInterruptSource = 1,
  571.     kISTInputDMAInterruptSource    = 2,
  572.     kISTPropertyMemberCount        = 3
  573. };
  574.  
  575.  
  576. typedef InterruptSetMember                 ISTProperty[3];
  577. #define kISTPropertyName    "driver-ist" 
  578.  
  579. typedef long                             InterruptReturnValue;
  580. enum {
  581.     kFirstMemberNumber            = 1,
  582.     kIsrIsComplete                = 0,
  583.     kIsrIsNotComplete            = -1,
  584.     kMemberNumberParent            = -2
  585. };
  586.  
  587. typedef Boolean                         InterruptSourceState;
  588. enum {
  589.     kSourceWasEnabled            = true,
  590.     kSourceWasDisabled            = false
  591. };
  592.  
  593.  
  594. typedef CALLBACK_API_C( InterruptMemberNumber , InterruptHandler )(InterruptSetMember ISTmember, void *refCon, UInt32 theIntCount);
  595. typedef CALLBACK_API_C( void , InterruptEnabler )(InterruptSetMember ISTmember, void *refCon);
  596. typedef CALLBACK_API_C( InterruptSourceState , InterruptDisabler )(InterruptSetMember ISTmember, void *refCon);
  597. enum {
  598.     kReturnToParentWhenComplete    = 0x00000001,
  599.     kReturnToParentWhenNotComplete = 0x00000002
  600. };
  601.  
  602. typedef OptionBits                         InterruptSetOptions;
  603. /*  Interrupt Services  */
  604. EXTERN_API_C( OSStatus )
  605. CreateInterruptSet                (InterruptSetID         parentSet,
  606.                                  InterruptMemberNumber     parentMember,
  607.                                  InterruptMemberNumber     setSize,
  608.                                  InterruptSetID *        setID,
  609.                                  InterruptSetOptions     options);
  610.  
  611.  
  612. EXTERN_API_C( OSStatus )
  613. InstallInterruptFunctions        (InterruptSetID         setID,
  614.                                  InterruptMemberNumber     member,
  615.                                  void *                    refCon,
  616.                                  InterruptHandler         handlerFunction,
  617.                                  InterruptEnabler         enableFunction,
  618.                                  InterruptDisabler         disableFunction);
  619.  
  620.  
  621. EXTERN_API_C( OSStatus )
  622. GetInterruptFunctions            (InterruptSetID         setID,
  623.                                  InterruptMemberNumber     member,
  624.                                  void **                refCon,
  625.                                  InterruptHandler *        handlerFunction,
  626.                                  InterruptEnabler *        enableFunction,
  627.                                  InterruptDisabler *    disableFunction);
  628.  
  629. EXTERN_API_C( OSStatus )
  630. ChangeInterruptSetOptions        (InterruptSetID         setID,
  631.                                  InterruptSetOptions     options);
  632.  
  633. EXTERN_API_C( OSStatus )
  634. GetInterruptSetOptions            (InterruptSetID         setID,
  635.                                  InterruptSetOptions *    options);
  636.  
  637.  
  638.  
  639.  
  640. #if PRAGMA_STRUCT_ALIGN
  641.     #pragma options align=reset
  642. #elif PRAGMA_STRUCT_PACKPUSH
  643.     #pragma pack(pop)
  644. #elif PRAGMA_STRUCT_PACK
  645.     #pragma pack()
  646. #endif
  647.  
  648. #ifdef PRAGMA_IMPORT_OFF
  649. #pragma import off
  650. #elif PRAGMA_IMPORT
  651. #pragma import reset
  652. #endif
  653.  
  654. #ifdef __cplusplus
  655. }
  656. #endif
  657.  
  658. #endif /* __DRIVERSERVICES__ */
  659.  
  660.